home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / mail / thor201.lha / THOR_2.0 / thor.lha / rexx / PGPViewPubKeys.thor < prev    next >
Text File  |  1995-05-15  |  1KB  |  63 lines

  1. /* $VER: PGPViewPubKeys.thor 3.3 (21.02.95)
  2.  * 
  3.  * An ARexx script that will view the contents of your public 
  4.  * PGP keyring.
  5.  *
  6.  * Based on ViewPGPpubkeys.thor v0.9ß (01.06.94)  © Christian Sandberg
  7.  * Additions by: Eivind Nordseth, Ultima Thule Software.
  8.  */
  9.  
  10. options results
  11. options failat 99
  12.  
  13. REQUESTNOTIFY TEXT '"Do you want limited or full verbose?"' BT '"_Limited|_Full"'
  14. if RC > 0 then do
  15.    say 'This script is not running on the THOR ARexx port!'
  16.    exit
  17.    end
  18.  
  19. if result = 1 then verbose = 'v'
  20. else verbose = 'vv'
  21.  
  22. GETGLOBALCONFIG CFG
  23. if(rc ~= 0) then exit
  24.  
  25. address BBSREAD GETGLOBALDATA stem GLOBALDATA
  26. if(rc ~= 0) then exit
  27.  
  28. Call Close 'STDOUT'
  29. Call Close 'STDIN'
  30. Call Open 'STDOUT','CON:0/14//400/PGPAmiga/CLOSE/AUTO/WAIT/SCREEN' || CFG.PUBSCREENNAME
  31. Call Pragma '*','STDOUT'
  32. Call Open 'STDIN','*'
  33.  
  34. if GLOBALDATA.PGPCommand = '' then 
  35. do
  36.     call getpath
  37.     pgpcommand = result
  38. end
  39. else pgpcommand = GLOBALDATA.PGPCOMMAND
  40.  
  41. address command pgpcommand ' -k' || verbose
  42. if(rc ~= 0) then
  43. do
  44.     REQUESTNOTIFY TEXT '"PGP failed. Check path or PGPPATH envirorment variable."' BT '"_Ok"'
  45.     exit
  46. end
  47.  
  48. exit
  49.  
  50. getpath: procedure
  51. address command 'GetEnv >PIPE:PGPPATH PGPPATH'
  52. If rc = 0 Then
  53. Do
  54.     If Open('ppath','PIPE:PGPPATH','R') Then
  55.     Do
  56.         path = ReadLN('ppath')
  57.         If ~Close('ppath') Then Nop
  58.         path = path||'/PGP'
  59.         Return path
  60.     End
  61.     Else Return ""
  62. End
  63.